Class Rule

java.lang.Object
edu.uky.ai.lp.logic.Rule

public class Rule
extends java.lang.Object
A rule is a logical axiom used deduce new information.
Author:
Stephen G. Ware
  • Field Summary

    Fields 
    Modifier and Type Field Description
    Expression antecedent
    The condition under which the consequent can be deduced
    Fact consequent
    The fact to be deduced
  • Constructor Summary

    Constructors 
    Constructor Description
    Rule​(Expression antecedent, Fact consequent)
    Constructs a new rule with the given antecedent and consequent.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • antecedent

      public final Expression antecedent
      The condition under which the consequent can be deduced
    • consequent

      public final Fact consequent
      The fact to be deduced
  • Constructor Details

    • Rule

      public Rule​(Expression antecedent, Fact consequent)
      Constructs a new rule with the given antecedent and consequent.
      Parameters:
      antecedent - the condition
      consequent - the fact to be deduced
  • Method Details

    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object